package org.jeik.beackBeans.search;

import java.io.Serializable;

/**
 * 
 * @author AAsha
 *
 */
@SuppressWarnings("serial")
public class SearchResultLink implements Serializable{
	
	private String URL;
	private Long serviceId;
	private String title;
	private String type;
	
	/**
	 * 
	 */
	public SearchResultLink() {
	}
	
	
	public SearchResultLink(Long serviceId, String title) {
		this.serviceId = serviceId;
		this.title = title;
	}
	
	/**
	 * 
	 * @param URL
	 * @param title
	 */
	public SearchResultLink(String URL, String title){
		this.URL = URL;
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getURL() {
		return URL;
	}

	public void setURL(String uRL) {
		URL = uRL;
	}

	/**
	 * @return the serviceId
	 */
	public Long getServiceId() {
		return serviceId;
	}

	/**
	 * @param serviceId the serviceId to set
	 */
	public void setServiceId(Long serviceId) {
		this.serviceId = serviceId;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((URL == null) ? 0 : URL.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SearchResultLink other = (SearchResultLink) obj;
		if (URL == null) {
			if (other.URL != null)
				return false;
		} else if (!URL.equals(other.URL))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		return true;
	}

}
